]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: Add option to not use background content size
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 9 Jun 2020 21:18:21 +0000 (18:18 -0300)
committerMarge Bot <marge-bot@gnome.org>
Fri, 29 Jan 2021 21:56:05 +0000 (21:56 +0000)
Will be used by next commit to draw workspaces at a different size of the
background itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1599>

js/ui/background.js

index 08e8036214e4e0d160dd31fcbe54117f6e78d41a..df2d98112f56dcb66138b32e6c10ce50eff96f25 100644 (file)
@@ -662,6 +662,7 @@ var BackgroundManager = class BackgroundManager {
             vignette: false,
             controlPosition: true,
             settingsSchema: BACKGROUND_SCHEMA,
+            useContentSize: true,
         });
 
         let cache = getBackgroundCache();
@@ -673,6 +674,7 @@ var BackgroundManager = class BackgroundManager {
         this._vignette = params.vignette;
         this._monitorIndex = params.monitorIndex;
         this._controlPosition = params.controlPosition;
+        this._useContentSize = params.useContentSize;
 
         this.backgroundActor = this._createBackgroundActor();
         this._newBackgroundActor = null;
@@ -747,6 +749,11 @@ var BackgroundManager = class BackgroundManager {
         let backgroundActor = new Meta.BackgroundActor({
             meta_display: global.display,
             monitor: this._monitorIndex,
+            request_mode: this._useContentSize
+                ? Clutter.RequestMode.CONTENT_SIZE
+                : Clutter.RequestMode.HEIGHT_FOR_WIDTH,
+            x_expand: !this._useContentSize,
+            y_expand: !this._useContentSize,
         });
         backgroundActor.content.set({
             background,